package com.example.springboot.demo.controller;

import cn.hutool.core.collection.CollUtil;
import com.github.f4b6a3.uuid.UuidCreator;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/creator")
public class CreatorUUIDGenerator {

    @GetMapping("/id")
    @ResponseBody
    public Object v7() {
        List<Object> list = CollUtil.newArrayList();
        for (int i = 0; i < 10; i++) {
            list.add(UuidCreator.getTimeOrderedEpoch());
        }
        return list;
    }

}
